package com.hcy;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

@SpringBootApplication(scanBasePackages = "com.hcy")
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.hcy")
@MapperScan("com.hcy.**.mapper")
public class CommonApiApplication {

	public static void main(String[] args) {
		SpringApplication.run(CommonApiApplication.class, args);
	}
	// 设置时区，防止new Date 时区不对
	@PostConstruct
	void started() {
		TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
	}
}
